<?php
  /*
  $Id: information.php,v 1.6 2002/11/22 18:56:08 dgw_ Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2002 osCommerce

  Released under the GNU General Public License
  */
?>
<!-- information //-->
          <tr>
            <td>
<?php
  $width = "160px";
  $height = "74px";
  $banner_query = tep_db_query("select banners_id, banners_title, banners_image, banners_url from " . TABLE_BANNERS . " where status = '1' and banners_group = 'partner'");
  $banner_rows = tep_db_num_rows($banner_query);
  if ($banner_rows) {
	    $info_box_contents = array();
		$info_box_contents[] = array('text' => BOX_HEADING_PARTNER);

		new infoBoxHeading($info_box_contents, false, false);

		$info_box_contents = array();
		$content_text = '<table cellpadding="0" cellspacing="5" border="0">';

		while ($banner = tep_db_fetch_array($banner_query)) {		
				$array_banner_name = explode('.', $banner['banners_image']);
				$banner_type = $array_banner_name[sizeof($array_banner_name) - 1];
				$banner_url = $banner['banners_url'];
				switch ($banner_type) {
					case 'swf' :
						$content_text .= '<tr>
												<td align="center"><a href="'.$banner_url.'" target="_blank"><embed '.' width="'.$width.'" name="plugin" src="'.DIR_WS_IMAGES.$banner['banners_image'].'" type="application/x-shockwave-flash"/></a></td>
										  </tr>';
						break;
					case 'gif' :
					case 'jpg' :
					case 'jpeg' :
					case 'png' :
						$content_text .= '<tr>
												<td align="center"><a href="'.$banner_url.'" target="_blank"'.tep_image(DIR_WS_IMAGES.$banner['banners_image'], $banner['banners_title'], $width, '').'</a></td>
										  </tr>';
						break;
				};
			
			
		}
		$content_text .= '</table>';
		$info_box_contents[]['text'] = $content_text;
		new infoBox($info_box_contents);
  }
  

 

  
?>
            </td>
          </tr>
<!-- information_eof //-->
